<include file="public@header">
<body>
    <div class="indexbg headhead">
        <form action="" method="post" class="layui-form">
        <h3 class="mytitle">{:lang('Edit Withdraw Address')}</h3>
        <div class="infshowall">
            <div class="infshow">
                <p>{:lang('Coin')}</p>
                <input type="text" name="symbol" value="USDT" readonly>
            </div>
            <div class="infshow">
                <p>{:lang('Address')}</p>
                <input type="text" name="address" value="{$row.address}" placeholder="{:lang('Please Enter Withdraw Address')}">
            </div>
            <div class="infshow">
                <p>{:lang('Remarks')}</p>
                <input type="hidden" name="id" value="{$row.id}">
                <input type="text" name="remark" placeholder="{:lang('Remarks')}">
            </div>
        </div>
        <button class="emailbtn" lay-submit>{:lang('Confirm')}</button>
        </form>
    </div>
    
    <script src="__STATIC__/hybit/js/jquery.min.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <script>
    layui.use(['layer','form'],function(){
        var layer = layui.layer,
            form = layui.form;

        //监听提交
        form.on('submit', function(data){
            var _this = $(this);
            _this.attr("disabled",true);
            $.ajax({
                type: 'post',
                url: '{:url("user/address/edit")}',
                data: data.field,
                success:function(res){
                    layer.msg(res.msg)
                    if(res.code == 1){
                        setTimeout(function(){ javascript:history.back(-1); }, 1500);
                    }else{
                        _this.removeAttr("disabled");
                    }
                }
            });
            return false;
        });
    });
    </script>
</body>
</html>